package weeny.util.io;

import java.awt.Event;
import java.awt.event.ActionEvent;

/**
 * Test the event for the modifier key status
 * 
 * @author weeny
 */
public class ModUtil {
	public static boolean isShiftDown(int modifier){
		return (modifier&Event.SHIFT_MASK)!=0;
	}
	public static boolean isShiftDown(ActionEvent ae){
		return isShiftDown(ae.getModifiers());
	}
	public static boolean isAltDown(int modifier){
		return (modifier&Event.ALT_MASK)!=0;
	}
	public static boolean isAltDown(ActionEvent ae){
		return isAltDown(ae.getModifiers());
	}
}
